/**
 * https://pintia.cn/problem-sets/994805046380707840/exam/problems/type/7?problemSetProblemId=994805145370476544
 */

#include<iostream>
using namespace std;
int main()
{
    int n,i,k,g=0,sum=0;
    char t;
    cin>>n>>t;
    g=n;
    n-=1;
    n/=2;
    for(i=3;sum<=n&&i<=n-sum;i+=2)
        sum+=i;
    i-=2;
    sum=g-(sum*2+1);
    g=i;
    n=0;
    while(i>=1){
        for(k=0;k<n;k++)
            cout<<' ';
        for(k=0;k<i;k++)
            cout<<t;
        cout<<endl;
        i-=2;
        ++n;
    }
    n-=2;i=3;
    while(i<=g){
        for(k=0;k<n;k++)
            cout<<' ';
        for(k=0;k<i;k++)
            cout<<t;
        cout<<endl;
        i+=2;
        --n;
    }
    cout<<sum<<endl;
    return 0;
}
